package exam.model.dao;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
/**
 * <p>HibernateSessionFactory</p>
 * 
 * @author Phong
 * @version 16/5/2012
 */

public class HibernateSessionFactory {
	/**
	 * factory
	 */
	private static SessionFactory factory;
	static {
		factory = new Configuration().configure().buildSessionFactory();
	}
	
	/**
	 * openSession()
	 * @return Session
	 */
	public static Session openSession() {
		return factory.openSession();
	} 
}
